/*
 * common.h
 *
 * common defines
 */

#pragma once

#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <pthread.h>
#include "network.h"

#define TRUE 1
#define FALSE 0

#define SUCCESS 1
#define FAILURE 0

#define MAX_PATH 1024
#define MAX_QUEUED_IMAGES 64

#define FLAG_ABORT (1<<0)
#define FLAG_PAUSE (1<<1)

// a cyclic array of images, used like a queue
extern image_t images[MAX_QUEUED_IMAGES];
unsigned int image_head, image_tail;
extern pthread_mutex_t image_mutex;
extern pthread_cond_t image_cond;
